#ifndef BOOKMARKSMENU_H
#define BOOKMARKSMENU_H

#include "ModelMenu.h"

#include <QUrl>
#include <QList>
#include <QAction>

class BookmarksManager;

// Menu that is dynamically populated from the bookmarks
class BookmarksMenu : public ModelMenu
{
    Q_OBJECT

signals:
    void openUrl(const QUrl &url);

public:
     BookmarksMenu(BookmarksManager *manager, QWidget *parent = 0);
     void setInitialActions(QList<QAction*> actions);

protected:
    bool prePopulated();

private slots:
    void activated(const QModelIndex &index);

private:
    BookmarksManager *m_bookmarksManager;
    QList<QAction*> m_initialActions;
};

#endif // BOOKMARKSMENU_H
